[Slack Alert] Pinterest UTM Check
Use this automation to check that the correct UTM parameters are used for all of your active Pinterest ads. For any ad that doesn’t follow your best practices, you will receive a Slack notification.
If you are looking for a way to check if your URLs are following a specific pattern, this automation is for you. Get a Slack message for any ads that don’t follow your UTM tracking structure.
JSON Recipe
Import the automation recipe(s) into your own account. Don’t know how? Learn here.
{"name":"[Slack Alert] Pinterest UTM Check","description":"fb_utm_check_20220325","nodes":{"delay_1":{"type":"delay","logging_enabled":false,"x":25,"y":213,"inputs":{"duration":{"export_enabled":true,"data":3600}}},"pinterest_select_ad_account_ids_1":{"type":"pinterest_select_ad_account_ids","logging_enabled":false,"x":397,"y":213,"inputs":{"ad_account_ids":{"export_enabled":true,"data":[]}}},"stop_1":{"type":"stop","logging_enabled":false,"x":21,"y":526,"inputs":{"stop":{"export_enabled":true}}},"for_each_v2_1":{"type":"for_each_v2","logging_enabled":false,"x":405,"y":413},"if_v2_1":{"type":"if_v2","logging_enabled":false,"x":1111,"y":408,"inputs":{"b":{"export_enabled":true,"data":[]},"condition":{"export_enabled":true,"data":"not_equal"}}},"pinterest_fetch_ads_1":{"type":"pinterest_fetch_ads","logging_enabled":false,"x":592,"y":292,"group":"group_1","inputs":{"operational_status":{"export_enabled":true,"data":"RUNNING"}}},"input_any_1":{"type":"input_any","logging_enabled":false,"x":819,"y":106,"group":"group_1","inputs":{"any":{"export_enabled":true,"data":[{"op":"add","path":"/root","value":{}},{"op":"move","path":"/root/url","from":"/destination_url"},{"op":"move","path":"/id_helper","from":"/id"},{"op":"add","path":"/root/id","value":{"provider":"pinterest","type":"ad"}},{"op":"move","path":"/root/id/id","from":"/id_helper"},{"op":"add","path":"/root/id/context/adset_id","value":{"provider":"pinterest","type":"ad_group"}},{"op":"move","path":"/root/id/context/adset_id/id","from":"/ad_group_id"},{"op":"move","path":"/root/id/context/ad_account_id","from":"/ad_account_id"},{"op":"move","path":"/root/id/context/ad_name","from":"/name"},{"op":"move","path":"","from":"/root"}]}}},"build_pattern_v2_1":{"type":"build_pattern_v2","logging_enabled":false,"x":234,"y":263,"group":"group_2","inputs":{"patterns":{"export_enabled":true,"data":[{"description":"UTM Source","regex":"utm_source=pinterest"},{"regex":"utm_medium=paid_social","description":"UTM Medium"},{"regex":"utm_campaign={{campaignname}}","description":"UTM Campaign"},{"regex":"utm_content={{adid}}","description":"UTM Content"},{"regex":"utm_term={{adgroupname}}","description":"UTM Term"},{"description":"UTM Ad ID","regex":"adid={adid}"},{"regex":"adsetid={adgroupid}","description":"UTM Adset ID"}]}}},"filter_v2_1":{"type":"filter_v2","logging_enabled":false,"x":1125,"y":428,"group":"group_2","inputs":{"filters":{"export_enabled":true,"data":[{"value":false,"pointer":"/valid","operator":"="}]}}},"slack_select_conversation_id_1":{"type":"slack_select_conversation_id","logging_enabled":false,"x":317,"y":272,"group":"group_3","inputs":{"conversation_id":{"title":"conversation_id","description":"Select a Slack Channel or Conversation"}}},"slack_notifier_v2_1":{"type":"slack_notifier_v2","logging_enabled":false,"x":660,"y":447,"group":"group_3","inputs":{"blocks":{"export_enabled":true,"data":[{"type":"section","text":{"type":"mrkdwn","text":"⚠️ At least one ad has incorrect URL parameters."}}]},"thread_ts":{"export_enabled":true}}},"slack_notifier_v2_2":{"type":"slack_notifier_v2","logging_enabled":false,"x":1727,"y":412,"group":"group_3"},"for_each_v2_2":{"type":"for_each_v2","logging_enabled":false,"x":1002,"y":353,"group":"group_3"},"patch_json_v2_1":{"type":"patch_json_v2","logging_enabled":false,"x":1332,"y":432,"group":"group_3","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/0/text/text","value":"Expected `{{input.value/pattern/regex}}` for _{{input.value/pattern/description}}_ but got `{{input.value/url/url}}`."},{"op":"replace","path":"/1/elements/0/url","value":"https://ads.pinterest.com/advertiser/{{input.value/url/id/context/ad_account_id}}/reporting/ads/?name={{input.value/url/id/context/ad_name}}"}]},"data":{"export_enabled":true,"data":[{"type":"section","text":{"type":"mrkdwn","text":""}},{"type":"actions","elements":[{"type":"button","text":{"type":"plain_text","text":"Open in Ads Manager"},"url":""}]}]}}},"match_url_patterns_v2_1":{"type":"match_url_patterns_v2","logging_enabled":false,"x":617,"y":366,"group":"group_2","outputs":{"matched":{"title":"matched","description":"Triggered when matched"}}},"start_1":{"type":"start","logging_enabled":false,"x":23,"y":473},"patch_json_list_v2_1":{"type":"patch_json_list_v2","logging_enabled":false,"x":823,"y":296,"group":"group_1","inputs":{"value":{"export_enabled":true}},"outputs":{"patched":{"title":"patched","description":"Triggers when the patching is done"}}}},"edges":["input_any_1.any:patch_json_list_v2_1.patches","build_pattern_v2_1.patterns:match_url_patterns_v2_1.patterns","match_url_patterns_v2_1.results:filter_v2_1.items","slack_notifier_v2_1.thread_ts:slack_notifier_v2_2.thread_ts","slack_select_conversation_id_1.conversation_id:slack_notifier_v2_2.conversation_id","slack_select_conversation_id_1.conversation_id:slack_notifier_v2_1.conversation_id","match_url_patterns_v2_1.matched:filter_v2_1.filter","filter_v2_1.filtered:if_v2_1.evaluate","slack_notifier_v2_1.sent:for_each_v2_2.start","patch_json_v2_1.data:slack_notifier_v2_2.blocks","for_each_v2_2.item:patch_json_v2_1.value","filter_v2_1.items:for_each_v2_2.items","filter_v2_1.items:if_v2_1.a","if_v2_1.true:slack_notifier_v2_1.send","patch_json_v2_1.patched:slack_notifier_v2_2.send","for_each_v2_2.do:patch_json_v2_1.patch","slack_notifier_v2_2.sent:for_each_v2_2.next","patch_json_list_v2_1.data_list:match_url_patterns_v2_1.urls","patch_json_list_v2_1.patched:match_url_patterns_v2_1.match","start_1.start:for_each_v2_1.start","pinterest_select_ad_account_ids_1.ad_account_ids:for_each_v2_1.items","for_each_v2_1.done:delay_1.start","delay_1.delayed:for_each_v2_1.start","for_each_v2_2.done:for_each_v2_1.next","pinterest_fetch_ads_1.fetched:patch_json_list_v2_1.patch","for_each_v2_1.do:pinterest_fetch_ads_1.fetch","pinterest_fetch_ads_1.ads:patch_json_list_v2_1.data_list","for_each_v2_1.item:pinterest_fetch_ads_1.ad_account_id"],"groups":{"group_2":{"title":"Check UTMs","description":"","x":879,"y":414,"inputs":["match_url_patterns_v2_1.match","match_url_patterns_v2_1.urls"],"outputs":["filter_v2_1.items","filter_v2_1.filtered"]},"group_3":{"title":"Send Slack Message","description":"","x":1344,"y":412,"inputs":["for_each_v2_2.items","slack_notifier_v2_1.send"],"outputs":["for_each_v2_2.done"]},"group_1":{"title":"Get active URLs","description":"","x":644,"y":414,"inputs":["pinterest_fetch_ads_1.fetch","pinterest_fetch_ads_1.ad_account_id"],"outputs":["patch_json_list_v2_1.data_list","patch_json_list_v2_1.patched"]}},"widgets":{"widget_1":{"title":"Ad Accounts","description":"Select one or more Pinterest Ad Accounts","position":0,"input":"pinterest_select_ad_account_ids_1.ad_account_ids"},"widget_2":{"title":"URL Parameters","description":"Add any URL parameter that you want to check against.","position":3,"icon":"","input":"build_pattern_v2_1.patterns"},"widget_3":{"title":"Slack Channel","description":"Select a Slack Channel or Conversation","position":3,"input":"slack_select_conversation_id_1.conversation_id"},"widget_4":{"title":"Run every","description":"The duration to delay the trigger (in Seconds)","position":0,"input":"delay_1.duration"}},"variables":{},"config":{"capture_inputs_enabled":false,"caching_enabled":false},"tags":[]}
How To
After creating the automation you are required to make a few selections and then hit “Run Automation”. The check will then take place on the specified weekday(s) at the specified time.
Step 1
Select an Ad Account
Step 2
Select a Slack Channel, in which you would like to receive the notifications
Step 3
Define how often you want the automation to run
Step 4
Create a pattern for your UTM.
Last updated on January 26, 2023